<!DOCTYPE html>
<html>

<head>
  <meta charset="utf-8" />
  <meta name="renderer" content="webkit" />
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
  <meta name="viewport" content="width=device-width,initial-scale=1.0" />
  <link rel="icon" type="image/png" href="./static/images/favicon.png" />
  <title></title>
</head>

<body>
  <script>
    // var postData = parseQuery(location.search);
    // postData.from = "PostLogin";
    var wxPayUrl = sessionStorage.getItem('wxPayUrl')
    if (wxPayUrl) {
      var params = location.search.substr(1)
      console.log(wxPayUrl)
      // var goBackUrl = postData.goBackUrl
      // location.href = postData.goBackUrl + '&code=' + postData.code + '&state=' + postData.state
      location.replace(wxPayUrl + '&' + params)
    } else {
      var origin = location.origin || (location.protocol + "//" + location.host);
      window.parent.postMessage(location.search + '&fromIframe=getWXCode', origin);
    }
    // function parseQuery(b) {
    //   const a = {};
    //   b = b.trim().replace(/^(\?|#|&)/, "");
    //   if (!b) {
    //     return a
    //   }
    //   b.split("&").forEach(function (f) {
    //     const d = f.replace(/\+/g, " ").split("=");
    //     const c = decodeURIComponent(d.shift());
    //     const e = d.length > 0 ? decodeURIComponent(d.join("=")) : null;
    //     if (a[c] === undefined) {
    //       a[c] = e
    //     } else {
    //       if (Array.isArray(a[c])) {
    //         a[c].push(e)
    //       } else {
    //         a[c] = [a[c], e]
    //       }
    //     }
    //   });
    //   return a
    // };
  </script>
</body>

</html>
